<template>
	<view class="safety storesTransfer">
		<view class="topHeaderBox between navBox" :style="{paddingTop: (systemBarHeight + 10) + 'px'}">
			<image class="backIcon" src="https://wx.2024csnl.com/static/mine/back.png" @click="goBack(100)"></image>
			<view>{{isEdit ? "编辑红包": "发布红包"}}</view>
			<view></view>
		</view>
		<view class="joinService">
			<view class="msgBox" style="margin-top: 50px;background: #f3f3f5">
				<view>
					<view class="recruitment">
						<view class="card">
							<form class="form">
								<view class="form-item" v-if="isEdit">
									<view class="form-label">
										<text>红包编号</text>
									</view>
									<view class="form-value">
										<view class="picker">
											{{info.id}}
										</view>
									</view>
								</view>
								<view class="form-item" v-if="!isEdit">
									<view class="form-label">
										<text>视频名称</text>
									</view>
									<view class="form-value">
										<view class="picker"
											style="display: flex; align-items: center; justify-content: flex-end;">
											<view>
												<picker mode="selector" :range="vlistArray" range-key="name"
													:value="index" @change="bindVPickerChange">
													<view style="font-size: 30rpx;color: #999999;">
														{{vName }}
													</view>
												</picker>
											</view>
											<view style="margin-left: 20px;" v-if="video_id">
												<button
													style="background-color: #41644A; height: 30px; color: white; font-size: 12px;"
													@click="clearVideoId">清除选择</button>
											</view>
											<view style="margin-left: 20px;" v-else>
												<button
													style="background-color: #41644A; height: 30px; color: white; font-size: 12px;"
													@click="createVideo">创建</button>
											</view>
										</view>
									</view>
								</view>

								<view class="form-item" v-if="isEdit">
									<view class="form-label">
										<text>关联视频</text>
									</view>
									<view class="form-value">
										<view class="picker"
											style="display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 10px 0;">
											<view v-for="(item, index) in video_list" :key="index"
												style="padding: 5px; width: 100%; border-bottom: 1px solid #eee;">
												<view
													style="display: flex; flex-direction: row; justify-content: flex-start; align-items: center; ">
													<view style="height: 30px;">
														<image :src="`${item.url}.cover.jpg`"
															style="width: 30px; height: 30px;" mode="aspectFill">
														</image>
													</view>
													<view style="height: 30px;line-height: 30px; margin-left: 10px;">
														<text
															style="color: #999; height: 30px; line-height: 30px;">{{item.name}}</text>
													</view>
												</view>
											</view>
										</view>
									</view>
								</view>

								<view class="form-tip" v-if="!isEdit">
									<text>选择需要展示红包的视频</text>
								</view>

								<view class="form-item">
									<view class="form-label">
										<image src="https://wx.2024csnl.com/static/hongbao/hongbao-1.png" mode="">
										</image>
										<text>发布距离</text>
									</view>
									<view class="form-value">
										<view class="number">
											<input type="number" v-model="show_km" name="show_km" placeholder="0.0">
											<text>米</text>
										</view>
									</view>
								</view>

								<view class="form-tip">
									<text>填0为全国可见</text>
								</view>

								<view class="form-item" v-if="!isEdit">
									<view class="form-label">
										<image src="https://wx.2024csnl.com/static/hongbao/hongbao-2.png" mode="">
										</image>
										<text>红包数量</text>
									</view>
									<view class="form-value">
										<view class="number">
											<input type="number" v-model="redbag_qty" name="number" placeholder="填写个数">
											<text>个</text>
										</view>
									</view>
								</view>

								<view class="form-tip" v-if="!isEdit">
									<text>单个类型红包数量</text>
								</view>

								<view class="form-item" v-if="!isEdit">
									<view class="form-label">
										<image src="https://wx.2024csnl.com/static/hongbao/hongbao-2.png" mode="">
										</image>
										<text>单个红包金额</text>
									</view>
									<view class="form-value">
										<view class="number">
											<input type="digit" v-model="redbag_amount" name="money"
												placeholder="0.00">
										</view>
									</view>
								</view>

								<view class="form-item" v-if="!isEdit">
									<view class="form-label">
										<text>上热门</text>
									</view>
									<view class="form-value">
										<checkbox-group @change="rbCheckboxChange">
											<view class="picker uni-list"
												style="display: flex; flex-direction: column;">
												<view style="flex: 1; display: flex; justify-content: flex-end;">
													<label class="uni-list-cell uni-list-cell-pd">
														<view>
															<checkbox color="#fc3e5a" value="rb_view"
																:checked="rb_view == 1" />
														</view>
														<view>观看</view>
													</label>
													<label class="uni-list-cell uni-list-cell-pd"
														style="margin-left: 10px;">
														<view>
															<checkbox color="#fc3e5a" value="rb_gz"
																:checked="rb_gz == 1" />
														</view>
														<view>关注</view>
													</label>
													<label class="uni-list-cell uni-list-cell-pd"
														style="margin-left: 10px;">
														<view>
															<checkbox color="#fc3e5a" value="rb_zan"
																:checked="rb_zan == 1" />
														</view>
														<view>点赞</view>
													</label>
												</view>
												<view style="flex: 1;display: flex; justify-content: flex-end;">
													<label class="uni-list-cell uni-list-cell-pd">
														<view>
															<checkbox color="#fc3e5a" value="rb_sc"
																:checked="rb_sc == 1" />
														</view>
														<view>收藏</view>
													</label>
													<label class="uni-list-cell uni-list-cell-pd"
														style="margin-left: 10px;">
														<view>
															<checkbox color="#fc3e5a" value="rb_zf"
																:checked="rb_zf == 1" />
														</view>
														<view>转发</view>
													</label>
												</view>
											</view>

										</checkbox-group>
									</view>
								</view>

								<view class="form-tip" v-if="!isEdit">
									<text>支持发布一种或者多种类型红包</text>
								</view>

								<view class="form-item">
									<view class="form-label">
										<text>选择支付方式</text>
									</view>
									<view class="form-value">
										<view class="picker">
											<picker v-if="!isEdit" mode="selector" :range="payListArray"
												range-key="name" :value="payIndex" @change="bindCPickerChange">
												<view style="font-size: 30rpx;color: #999999;">
													{{payName }}
												</view>
											</picker>
											<view v-if="isEdit" style="font-size: 30rpx;color: #999999;">
												{{payName }}
											</view>
										</view>
									</view>
								</view>

								<view v-if="isEdit" class="form-item">
									<view class="form-label">
										<text>当前数据</text>
									</view>
									<view class="form-value">
										<view>
											<view
												style="display: flex; flex-direction: column; flex: 1; justify-content: center; padding: 10px 0px;">
												<text
													style="font-size: 12px; color:#333; line-height: 20px;">观看红包：{{info.send_view_num}}/{{info.rb_view_qty}}</text>
												<text
													style="font-size: 12px; color:#333; line-height: 20px;">点赞红包：{{info.send_zan_num}}/{{info.rb_zan_qty}}</text>
												<text
													style="font-size: 12px; color:#333; line-height: 20px;">关注红包：{{info.send_gz_num}}/{{info.rb_gz_qty}}</text>
												<text
													style="font-size: 12px; color:#333; line-height: 20px;">收藏红包：{{info.send_sc_num}}/{{info.rb_sc_qty}}</text>
												<text
													style="font-size: 12px; color:#333; line-height: 20px;">转发红包：{{info.send_zf_num}}/{{info.rb_zf_qty}}</text>
											</view>
										</view>
									</view>
								</view>

								<view class="form-money">
									<view class="money">
										<text>￥</text>
										<text>{{amountTotal}}</text>
									</view>
									<view class="tip">
										<text>支付金额说明：</text>
										<text>支付金额为实际发放红包总金额加上广告服务费之和。</text>
										<text>广告服务费金额为红包金额的1% 。</text>
									</view>
								</view>

								<view class="form-foot">
									<view class="btns">
										<view class="item" v-if="!isEdit">
											<button type="default" class="submit" @click="onSubmit()">
												<text>塞钱进红包</text>
											</button>
										</view>
										<view class="item" v-if="isEdit && status != 3">
											<button type="default" class="submit" @click="onSubmit()">
												<text>更新红包</text>
											</button>
										</view>

										<view class="item" v-if="isEdit && status != 3">
											<button type="default" class="reset" @click="onRefund()">
												<text>撤回</text>
											</button>
										</view>
									</view>
								</view>
							</form>
						</view>
						<pay-keyboard :show_key="show_pay_keyboard" @hideFun="hidePayKeyboard" :show_forget="true"
							@getPassword="getPayPassword"></pay-keyboard>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getBusinessType,
		setBusinessLicense,
		postVideoData,
		checkpaypwdRequest
	} from "../../api/index.js"
	export default {
		components: {},
		data() {
			return {
				show_pay_keyboard: false,
				redbag_qty: 0,
				redbag_amount: '0.00',
				payPassword: '',
				payIndex: 0,
				index: 0,
				isEdit: false,
				info: {},
				video_list: [],
				red_name: '',
				red_desc: '',
				red_img: '',
				show_video: 1,
				show_earth: 1,
				show_vr: 1,
				show_km: 0,
				date_range: '',
				status: 1,
				rb_view: 1,
				rb_zan: 1,
				rb_sc: 1,
				rb_gz: 1,
				rb_zf: 1,
				rb_view_long: 0,
				rb_view_qty: '',
				rb_view_amount: '',
				rb_zan_qty: '',
				rb_zan_amount: '',
				rb_gz_qty: '',
				rb_gz_amount: '',
				rb_sc_qty: '',
				rb_sc_amount: '',
				rb_zf_qty: '',
				rb_zf_amount: '',
				paytype_id: '',
				payName: '请支付方式',
				payList: [{
						id: 1,
						name: '余额支付'
					},
					{
						id: 100,
						name: '泌豆支付'
					},
					{
						id: 200,
						name: '泌豆+余额支付'
					},
				],
				payListArray: ['余额支付', '泌豆支付', '泌豆+余额支付'],

				vlistArray: [], //经营类型list
				vlist: [], //经营类型
				vName: '请选择视频',
				video_id: 0,
				isAgency: getApp().globalData.isAgency,
				systemBarHeight: getApp().globalData.systemBarHeight,
			}
		},
		computed: {
			// 一个计算属性的 getter
			amount() {
				var amount = 0.00;
				if (this.rb_view_qty && this.rb_view_amount) {
					amount += this.rb_view_qty * this.rb_view_amount
				}

				if (this.rb_zan_qty && this.rb_zan_amount) {
					amount += this.rb_zan_qty * this.rb_zan_amount
				}

				if (this.rb_gz_qty && this.rb_gz_amount) {
					amount += this.rb_gz_qty * this.rb_gz_amount
				}

				if (this.rb_sc_qty && this.rb_sc_amount) {
					amount += this.rb_sc_qty * this.rb_sc_amount
				}

				if (this.rb_zf_qty && this.rb_zf_amount) {
					amount += this.rb_zf_qty * this.rb_zf_amount
				}

				return amount;
			},
			// 一个计算属性的 getter
			amountTotal() {
				var amount = 0.00;
				if (this.isEdit) {
					var amount = 0.00;
					if (this.rb_view_qty && this.rb_view_amount) {
						amount += this.rb_view_qty * this.rb_view_amount
					}

					if (this.rb_zan_qty && this.rb_zan_amount) {
						amount += this.rb_zan_qty * this.rb_zan_amount
					}

					if (this.rb_gz_qty && this.rb_gz_amount) {
						amount += this.rb_gz_qty * this.rb_gz_amount
					}

					if (this.rb_sc_qty && this.rb_sc_amount) {
						amount += this.rb_sc_qty * this.rb_sc_amount
					}

					if (this.rb_zf_qty && this.rb_zf_amount) {
						amount += this.rb_zf_qty * this.rb_zf_amount
					}

					return amount + amount * 0.01;
				}

				var totalCategory = 0;
				if (this.rb_view == 1) {
					totalCategory++;
				}

				if (this.rb_zan == 1) {
					totalCategory++;
				}

				if (this.rb_gz == 1) {
					totalCategory++;
				}

				if (this.rb_sc == 1) {
					totalCategory++;
				}

				if (this.rb_zf == 1) {
					totalCategory++;
				}

				amount = totalCategory * this.redbag_qty * parseFloat(this.redbag_amount);

				return amount + amount * 0.01;
			}
		},
		async onLoad(opt) {
			if (opt.id) {
				this.isEdit = true;

				await this.onGetVideoInfo(opt.id)

				this.red_name = this.info.red_name;
				this.red_desc = this.info.red_desc;
				this.red_img = this.info.red_img;
				this.show_video = this.info.show_video;
				this.show_earth = this.info.show_earth;
				this.show_vr = this.info.show_vr;
				this.video_id = this.video_id;
				this.show_km = this.info.show_km;
				this.date_range = [this.info.start_time, this.info.end_time];
				this.status = this.info.status;
				this.rb_view_long = this.info.rb_view_long;
				this.rb_view_qty = this.info.rb_view_qty;
				this.rb_view_amount = this.info.rb_view_amount;
				this.rb_zan_qty = this.info.rb_zan_qty;
				this.rb_zan_amount = this.info.rb_zan_amount;
				this.rb_gz_qty = this.info.rb_gz_qty;
				this.rb_gz_amount = this.info.rb_gz_amount;
				this.rb_sc_qty = this.info.rb_sc_qty;
				this.rb_sc_amount = this.info.rb_sc_amount;
				this.rb_zf_qty = this.info.rb_zf_qty;
				this.rb_zf_amount = this.info.rb_zf_amount;
				this.payName = this.info.paytype_id == 1 ? "余额支付" : (this.info.paytype_id == 100 ? "泌豆支付" :
					"泌豆+余额支付");
				this.paytype_id = this.info.paytype_id;
				this.onGetMyVideoList();

			} else {
				this.isEdit = false;
				this.onGetMyVideoList();
			}
		},
		onShow() {
			this.onGetMyVideoList();
		},
		methods: {
			clearVideoId() {

				this.video_id = '';
				this.vName = '请选择视频';
			},
			createVideo() {
				uni.navigateTo({
					url: "/pages/video/publishVideo"
				})
			},
			rbCheckboxChange(e) {
				var list = e.detail.value;
				if (list.includes("rb_view")) {
					this.rb_view = 1;
				} else {
					this.rb_view = 0;
				}
				if (list.includes("rb_zan")) {
					this.rb_zan = 1;
				} else {
					this.rb_zan = 0;
				}
				if (list.includes("rb_sc")) {
					this.rb_sc = 1;
				} else {
					this.rb_sc = 0;
				}
				if (list.includes("rb_gz")) {
					this.rb_gz = 1;
				} else {
					this.rb_gz = 0;
				}

				if (list.includes("rb_zf")) {
					this.rb_zf = 1;
				} else {
					this.rb_zf = 0;
				}

				console.log(list)
				console.log(this.rb_gz)
			},

			bindVPickerChange(e) {
				this.vName = this.vlistArray[e.detail.value]
				this.video_id = this.vlist[e.detail.value].id
			},

			// 获取商家类型
			async onGetMyVideoList() {
				const res = await getBusinessType('s=/ApiShortvideo/myvideolist')
				const {
					datalist,
					msg,
					status
				} = res.data
				console.log(res, "Videocategory")
				if (status == 1) {
					this.vlistArray = datalist.map(item => {
						return item.name
					})

					this.vlist = datalist

					for (var i = 0; i < datalist.length; i++) {
						if (datalist[i].id == this.video_id) {
							this.vName = datalist[i].name
						}
					}
				} else {
					this.showToast(msg)
				}
			},
			async getPayPassword(n) {
				console.log("用户输入的密码", n)
				this.payPassword = n.password;
				this.show_pay_keyboard = false

				const res = await checkpaypwdRequest('s=/ApiMy/checkpaypwd', {
					paypwd: this.payPassword
				})
				const {
					id,
					status,
					msg
				} = res.data

				if (status == 1) {
					await this.submit()
				} else {
					this.showToast(msg)
				}
			},
			async showPayKeyboard() {
				this.show_pay_keyboard = true
			},
			hidePayKeyboard() {
				this.show_pay_keyboard = false
			},
			switchShowVideoChange: function(e) {
				this.show_video = e.detail.value ? 1 : 0;
			},
			switchShowEarthChange: function(e) {
				this.show_earth = e.detail.value ? 1 : 0;
			},
			switchShowVrChange: function(e) {
				this.show_vr = e.detail.value ? 1 : 0;
			},
			switchStatusChange: function(e) {
				this.status = e.detail.value ? 1 : 0;
			},
			bindCPickerChange(e) {
				this.payName = this.payListArray[e.detail.value]
				this.paytype_id = this.payList[e.detail.value].id
			},
			// 提交数据
			async submit() {
				if (this.isEdit) {
					const res = await postVideoData(`s=/ApiShortvideo/editredbag`, {
						id: this.info.id,
						red_name: this.red_name,
						red_desc: this.red_desc,
						red_img: this.red_img,
						show_video: this.show_video,
						show_earth: this.show_earth,
						show_vr: this.show_vr,
						show_km: this.show_km,
						start_time: this.date_range[0],
						end_time: this.date_range[1],
						status: this.status,
						rb_view_long: this.rb_view_long,
						rb_view_qty: this.rb_view_qty,
						rb_view_amount: this.rb_view_amount,
						rb_zan_qty: this.rb_zan_qty,
						rb_zan_amount: this.rb_zan_amount,
						rb_gz_qty: this.rb_gz_qty,
						rb_gz_amount: this.rb_gz_amount,
						rb_sc_qty: this.rb_sc_qty,
						rb_sc_amount: this.rb_sc_amount,
						paytype_id: this.paytype_id,
						redbag_qty: this.redbag_qty,
						video_id: this.video_id,
						redbag_amount: this.redbag_amount,
						rb_view: this.rb_view,
						rb_zan: this.rb_zan,
						rb_sc: this.rb_sc,
						rb_gz: this.rb_gz,
						rb_zf: this.rb_zf,
					})

					console.log(res)

					if (res.data.status == 1) {
						this.showToast(res.data.msg);
						uni.navigateBack({
							delta: 1
						});
					} else {
						this.showToast(res.data.msg);
					}
				} else {
					//uploadredbagnew@段太阳 
					const res = await postVideoData(`s=/ApiShortvideo/uploadredbagnew`, {
						red_name: this.red_name,
						red_desc: this.red_desc,
						red_img: this.red_img,
						show_video: this.show_video,
						show_earth: this.show_earth,
						show_vr: this.show_vr,
						show_km: this.show_km,
						start_time: this.date_range[0],
						end_time: this.date_range[1],
						status: this.status,
						rb_view_long: this.rb_view_long,
						rb_view_qty: this.rb_view_qty,
						rb_view_amount: this.rb_view_amount,
						rb_zan_qty: this.rb_zan_qty,
						rb_zan_amount: this.rb_zan_amount,
						rb_gz_qty: this.rb_gz_qty,
						rb_gz_amount: this.rb_gz_amount,
						rb_sc_qty: this.rb_sc_qty,
						rb_sc_amount: this.rb_sc_amount,
						paytype_id: this.paytype_id,
						redbag_qty: this.redbag_qty,
						video_id: this.video_id,
						redbag_amount: this.redbag_amount,
						rb_view: this.rb_view,
						rb_zan: this.rb_zan,
						rb_sc: this.rb_sc,
						rb_gz: this.rb_gz,
						rb_zf: this.rb_zf,

					})

					console.log(res)

					if (res.data.status == 1) {
						this.showToast(res.data.msg);
						uni.navigateBack({
							delta: 1
						});
					} else {
						this.showToast(res.data.msg);
					}
				}

			},
			async onRefund() {
				const res = await postVideoData(`s=/ApiShortvideo/refundredbag`, {
					id: this.info.id
				})

				console.log(res)

				if (res.data.status == 1) {
					this.showToast(res.data.msg);
					uni.navigateBack({
						delta: 1
					});
				} else {
					this.showToast(res.data.msg);
				}
			},
			onSubmit() {
				const {
					red_name,
					red_desc,
					red_img,
					date_range,
					status,
					paytype_id,
				} = this
				switch (true) {
					case paytype_id == '':
						this.showToast('请选择支付方式')
						break;
					case this.amountTotal <= 0:
						this.showToast('请填写红包数量、金额、类型')
						break;
					default:
						this.showPayKeyboard()
				}
			},
			//上传图片
			async chooseFile() {
				uni.chooseImage({
					count: 1,
					// sourceType: ['album'],
					success: (res) => {
						uni.showLoading({
							title: '上传中...'
						})
						this.upImg(res.tempFilePaths[0])
					}
				});
			},
			upImg(path) {
				let BASE_URL = getApp().globalData.BASE_URL
				let platform = 'app'
				// #ifdef H5
				if (this.isAgency) {
					platform = 'h5'
					BASE_URL = '/api'
				}

				// #endif

				const sessionData = uni.getStorageSync('sessionData')
				// #ifdef H5
				platform = 'h5'
				if (isAgency) {
					BASE_URL = '/api'
				}
				// #endif
				let sessionDataLink = "";
				if (sessionData && sessionData.session_id) {
					sessionDataLink = `&session_id=${sessionData.session_id}`;
				}
				console.log(`${BASE_URL}?s=/ApiVideoupload/uploadImg&aid=1&platform=${platform}${sessionDataLink}`)
				uni.uploadFile({
					url: `${BASE_URL}?s=/ApiVideoupload/uploadImg&aid=1&platform=${platform}${sessionDataLink}`,
					filePath: path,
					name: 'file',
					// #ifndef H5
					header: {
						'content-type': 'multipart/form-data'
					},
					// #endif
					success: (res) => {
						console.log(res, "上传成功")
						const data = JSON.parse(res.data);
						// console.log(data, "data")
						const {
							msg,
							status,
							url
						} = data
						if (status == 1) {
							this.red_img = url
						}
						uni.hideLoading();
					}
				});
			},


			// 获取商家类型
			async onGetVideoInfo(id) {
				const res = await getBusinessType(`s=/ApiShortvideo/getredbaginfo&id=${id}`)
				const {
					redbag_info,
					video_list,
					msg,
					status
				} = res.data
				console.log(res, "redbag_info")
				if (status == 1) {
					this.info = redbag_info
					this.video_list = video_list
				} else {
					this.showToast(msg)
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.btnBox {
		padding: 0 30rpx 40rpx 30rpx;
		border-bottom: 1px solid #f7f7f7;
	}

	.oneBtn {
		text-align: center;
		color: #333333;
		background: #F7F7F7;
		border-radius: 30rpx;
		width: 185rpx;
		padding: 11rpx 0;
	}

	.activeBtn {
		color: #fff;
		background: #41644A;
	}

	.msgBox {
		position: absolute;
		top: 0;
		width: 100vw;
		border-radius: 50rpx 50rpx 0 0;
		padding: 50rpx 0;
		background: #fff;
	}

	.topHeaderBox {
		// #ifdef APP-PLUS
		padding: 30rpx;
		// #endif
		// #ifdef H5
		padding: 30rpx;
		// #endif
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		z-index: 99999;
		display: flex;
		background: #41644A;

	}

	.navBox {
		font-size: 34rpx;
		font-weight: bold;
		color: #fff;
	}

	.backIcon {
		width: 21rpx;
		height: 37rpx;
	}

	.joinService {
		.bgImg {
			width: 100vw;
			height: 488rpx;
		}

	}
</style>


<style lang="scss" scoped>
	.license {
		margin-left: 20%;
		width: 290rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap
	}

	.agreement {
		text-align: center;
		color: #999;
		font-size: 22rpx;
		margin: 52rpx 0 30rpx;

		text {
			color: #0084FF;
			margin-left: 10rpx;
		}
	}

	.upTwoImageBox {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-gap: 0 26rpx;

		image {
			width: 100%;
			height: 218rpx;
		}
	}

	.licenseTit {
		color: #666;
		font-size: 32rpx;
	}

	.minorText {
		color: #C8C8C8;
		font-size: 30rpx;
	}

	.licenseBox {
		padding: 30rpx;
		font-size: 36rpx;

		.hint {
			font-size: 24rpx;
			color: #C8C8C8;
			margin: 29rpx 0 46rpx 0;
		}

		.upOne {
			height: 340rpx;
			width: 100%;
		}

	}

	.downIcon {
		right: 60rpx;
		position: absolute;
		width: 34rpx;
		height: 15rpx;
	}

	.card {
		border-top: 10rpx solid #f7f7f7;
	}

	.recruitment {}

	.addressBox {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 65%;

	}



	.submitBtn {
		flex: 1;
		margin: 50rpx 30rpx;
		color: #fff;
		font-size: 34rpx;
		background: #41644A;
		border-radius: 14rpx;
		padding: 20rpx 0;
		justify-content: center;
	}

	.submitBtn_Green {
		flex: 1;
		margin: 50rpx 30rpx;
		color: #fff;
		font-size: 34rpx;
		background: green;
		border-radius: 14rpx;
		padding: 20rpx 0;
		justify-content: center;
	}

	.textareaBox {
		position: relative;
	}

	.textNum {
		position: absolute;
		bottom: 20rpx;
		text-align: end;
		width: 95%;
	}


	.oneInput {
		margin-bottom: 30rpx;
		font-size: 36rpx;
		padding: 30rpx 41rpx;
		border-bottom: 1px solid #f7f7f7;
		border-radius: 10rpx;
		align-items: center;

		.title {
			width: 30%;
			font-size: 15px;
		}

	}
</style>


<style lang="less" scoped>
	.uni-list-cell {
		display: flex;
		justify-content: flex-start
	}

	.form {
		position: relative;
		overflow: hidden;
		padding: 0 0;
		display: block;

		.form-item {
			position: relative;
			overflow: hidden;
			margin: 40rpx;
			background: #ffffff;
			border-radius: 10rpx;

			.form-label {
				float: left;
				height: 100rpx;
				line-height: 100rpx;
				padding: 0 40rpx;

				image {
					vertical-align: middle;
					width: 50rpx;
					height: 50rpx;
					margin-right: 10rpx;
				}

				text {
					vertical-align: middle;
					font-size: 28rpx;
					font-weight: bold;
				}
			}

			.form-value {
				padding: 0 40rpx;
				line-height: 100rpx;
				font-size: 28rpx;
				text-align: right;

				.picker {
					.placeholder {
						color: #999999;
					}
				}

				.number {
					display: flex;

					input {
						flex: 1;
						height: 100rpx;
						background: transparent;
						font-size: 28rpx;
					}

					text {
						margin: 0 0 0 20rpx;
						color: #000000;
						font-size: 30rpx;
					}
				}
			}
		}

		.form-tip {
			margin: -30rpx 0 0 80rpx;
			line-height: 40rpx;

			text {
				font-size: 24rpx;
				color: #999999;
			}
		}

		.form-money {
			position: relative;
			margin: 0 0 40rpx;

			.money {
				position: relative;
				padding: 0;
				margin: 0 0 40rpx;
				text-align: center;
				color: #000000;
				line-height: 1.2;

				text {
					vertical-align: middle;
					font-size: 60rpx;

					&:nth-child(2) {
						font-size: 100rpx;
						font-weight: bold;
					}
				}
			}

			.tip {
				position: relative;
				margin: 0 80rpx;

				text {
					display: block;
					font-size: 24rpx;
					color: #999999;
				}
			}
		}

		.form-foot {
			position: relative;

			.btns {
				display: flex;
				padding: 0 20rpx;
			}

			.item {
				flex: 1;

				button {
					position: relative;
					margin: 20rpx;
					border: 0;
					height: 100rpx;
					line-height: 100rpx;
					font-size: 30rpx;
					color: #ffffff;

					&.submit {
						background: #fc3e5a;
					}

					&.reset {
						background: #1ec95f;
					}
				}
			}
		}
	}
</style>